<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ShowUserImage
 *
 * @author neozilon
 */
class Nosql_View_Helper_ShowUserImage extends Zend_View_Helper_Abstract{

    /**
     * @param int $userId
     * 
     */
    public function showUserImage($userNickName){

        $image = '';
        $path = APPLICATION_PATH . '/../public/img/userimg/' .$userNickName . '.png';
        $urlPath = '/img/userimg/';
        if (file_exists($path)){
            $img = $urlPath . $userNickName;
        }else{
            $img = $urlPath . 'nopic.gif';
        }

        return $img;

    }

}